package com.bmps.springcloud.insuredmicroservice.annotation.accept;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * @author lyw
 * @date 2019/07/30
 */
@Documented
@Target(FIELD)
@Retention(RUNTIME)
@Constraint(validatedBy = {EqualsValidator.class })
public @interface Equals {
    //目标值
    String targetValue() default "";

    //如果校验不通过返回的提示信息
    String message() default "{javax.validation.constraints.NotNull.message}";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };
}
